<template>
  <view class="card u-p-30">
      <div class="cardHeader u-flex" @click="$u.route({url:'/pagesC/goods/goodsDetails',params:{id:comments.goods_id}})">
        <u-avatar :src="comments.goods_img" size="mini" class="u-m-r-20"></u-avatar>
        <div style="width: 600upx">
          <h4 class="u-line-1">{{comments.goods_name}}</h4>
          <p :style="{color:$u.color['tipsColor']}">
            <span class="u-m-r-15">{{$u.timeFrom(new Date(comments.time))}}</span>

          </p>
        </div>
      </div>

    <div class="content u-m-20">
      <p>{{comments.content}}</p>
    </div>
    <div class="u-flex u-flex-wrap ">
       <block v-for="(item,index) in comments.img_list" :key="index">
            <u-image :src="item" width="32%" height="220" border-radius="6" class="u-m-5"  @click="$utils.previewImgs(comments.img_list,index)"></u-image>
       </block>
    </div>
    <div class="bottom u-m-t-15">
      <div class="u-flex u-m-t-15">
        <text class="leftText">{{$t('订单号')}}：</text>
        <span>{{comments.ordernumber}}</span>
      </div>
    <div class="u-flex u-m-t-15">
      <text class="leftText">{{$t('商品评分')}}：</text>
      <u-rate  v-model="comments.goods_star" active-color="#ff9900" disabled></u-rate>

    </div>
      <div class="u-flex u-m-t-15">
      <text class="leftText">{{$t('服务评分')}}：</text>
      <u-rate  v-model="comments.goods_star" active-color="#ff9900" disabled></u-rate>
    </div>
      <div class="u-flex u-m-t-15"  v-if="false">
        <u-tag :text="$t('订单详情')"  @click="$u.route({url:'/pagesB/seller/orderDetails',params:{order_num:comments.order_id}})" mode="light" type="warning" shape="circle" />
    </div>

    </div>

  </view>
</template>

<script>
export default {
name: "commnetsCard",
  props:{
    comments:{
      type:Object,
      default:()=>{{}}
    }
  }
}
</script>

<style lang="scss" scoped>
@import '~uview-ui/index.scss';
page{
  background-color: #f5f5f5;
}
.card{
  background-color: #fff;
  margin-bottom: 15upx;
  border-radius: 14upx;
}
.leftText{
  color:#999;
  font-size: 24upx;
}
</style>
